package com.literature.search.file.entity.vo;

import com.literature.search.core.entity.EsPageObject;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

/**
 * @Author: DangKong
 * @Date: 2023/3/2 21:43
 * @Description: 存在ES中的父对象
 */



@Data
@ApiModel("ES中每一页的文本内容VO")
public class EsPageObjectVO implements Serializable {

    private static final long serialVersionUID = 1L;



    @ApiModelProperty("每页文本内容ID")
    private String id;


    @ApiModelProperty("所在页码")
    private Integer pageNumber;

    @ApiModelProperty("页面内容")
    private String content;

    @ApiModelProperty("标签")
    private String tag;

    @ApiModelProperty("相关性得分")
    private Float score;

    @ApiModelProperty("Highlight内容")
    private String highlightContent;

    public void setFromEsPageObject(EsPageObject esPageObject) {
        this.id = esPageObject.getId();
        this.pageNumber = esPageObject.getPageNumber();
        //this.content = esPageObject.getContent();
        this.tag = esPageObject.getTag();

    }
}
